package web.telnet;

import java.net.InetAddress;

public class InetAddressTest {
    public static void main(String[] args) throws Exception {
        if (args.length > 0) {
            InetAddress[] address = InetAddress.getAllByName(args[0]);
            for (InetAddress a : address) {
                System.out.println(a);
            }

        } else {
            InetAddress localHostAddress = InetAddress.getLocalHost();
            System.out.println(localHostAddress);
        }
    }

}
